#pragma once
#include "ataskinterface.h"
#include <string>
using std::string;
#include "gdal_priv.h"
#include <qobject.h>

class TheTask : public QObject, public ARSSTaskInterface
{
	Q_OBJECT
public:
	TheTask(string infile, string outfile, double percent,double vmin,double vmax);
	virtual void run() ;
private:
	string _infile;
	string _outfile;
	double _percent;
	double _vmin;
	double _vmax;
	void doOneBand(GDALDataset* inds, GDALDataset* outds, 
		int iband0b,const int xsize,const int ysize, const int allbandrows,
		double vmin,double vmax);

signals:
	void onSaveTaskDone();
};

